package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 材料定损实体类
 *
 * @author 范学春
 */
public class MaterialLossEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -6776117449484509211L;

    private Long MaterialLossId;
    private String TypeOfLoss;
    private String LossSpecification;
    private String RequiredAmount;
    private Double OrderLoss;
    private Double ArrivalLoss;
    private String Description;

    public Long getMaterialLossId() {
        return MaterialLossId;
    }

    public String getTypeOfLoss() {
        return TypeOfLoss;
    }

    public String getLossSpecification() {
        return LossSpecification;
    }

    public String getRequiredAmount() {
        return RequiredAmount;
    }

    public Double getOrderLoss() {
        return OrderLoss;
    }

    public Double getArrivalLoss() {
        return ArrivalLoss;
    }

    public String getDescription() {
        return Description;
    }

    public void setMaterialLossId(Long MaterialLossId) {
        this.MaterialLossId = MaterialLossId;
    }

    public void setTypeOfLoss(String TypeOfLoss) {
        this.TypeOfLoss = TypeOfLoss;
    }

    public void setLossSpecification(String LossSpecification) {
        this.LossSpecification = LossSpecification;
    }

    public void setRequiredAmount(String RequiredAmount) {
        this.RequiredAmount = RequiredAmount;
    }

    public void setOrderLoss(Double OrderLoss) {
        this.OrderLoss = OrderLoss;
    }

    public void setArrivalLoss(Double ArrivalLoss) {
        this.ArrivalLoss = ArrivalLoss;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof MaterialLossEntity)) {
            return false;
        }

        final MaterialLossEntity that = (MaterialLossEntity) o;

        return new EqualsBuilder()
                .append(this.getMaterialLossId(), that.getMaterialLossId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getMaterialLossId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
